package com.yuxuan.service.impl;

import com.yuxuan.service.RpcService;
import org.apache.servicecomb.provider.pojo.RpcReference;
import org.springframework.stereotype.Component;

/**
 * rpc服务消费放
 */
@Component
public class RestConsumerServiceImpl implements RpcService {

    //从注册中心找
    @RpcReference(schemaId = "helloRpcSrv",microserviceName = "service-prvider-rpc")
    private RpcService rpcService;



    @Override
    public String sayRpc(String name) {
        return rpcService.sayRpc(name);
    }

    @Override
    public String strToUpper(String name) {
        return rpcService.strToUpper(name);
    }
}
